#include "Warrior.h"
#include <stdlib.h>

Warrior::Warrior() 
	: Character(WARRIOR_STRENGTH_VALUE, WARRIOR_STRENGTH_COUNTERS, WARRIOR_CRAFT_VALUE, WARRIOR_CRAFT_VALUE, WARRIOR_LIVES, WARRIOR_LIVES, WARRIOR_FATE_VALUE, WARRIOR_FATE_VALUE, WARRIOR_STARTING_GOLD)
{
	
}

//SPECIAL ABILITY: Warrior can roll two dice in battle and use higher attack roll.
int Warrior::attackRoll()
{
	int attack = 0;
	int firstRoll = rand() % 6 + 1;
	int secondRoll = rand() % 6 + 1;
	if (firstRoll > secondRoll)
		attack = firstRoll + getStrength(); // + any other modifiers from Weapons and such
	else
		attack = secondRoll + getStrength(); // + any other modifiers from Weapons and such
	return attack; 
}

void Warrior::announce()
{
	cout << "====== Warrior ====== \nStrength: " << getStrength() << "\nCraft: " << getCraft() << " \nLives: " << getLives() << " \nFate: " << getFate() << " \nGold: " << getGold() << endl;
	if (getLives() == 0)
		cout << "Warrior is dead" << endl;
}